package com.macro.mall.service.impl;

import com.macro.mall.mapper.PmsProductTagsMapper;
import com.macro.mall.model.PmsProductTags;
import com.macro.mall.service.PmsProductTagsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：尚志豪
 * @Package：com.macro.mall.service.impl
 * @Project：mall-swarm-B
 * @name：PmsProductTagsControllerServiceImpl
 * @Date：2024/10/31 10:18
 */
@Service
public class PmsProductTagsServiceImpl implements PmsProductTagsService {
    @Autowired
    private PmsProductTagsMapper productTagsMapper;
    /**
     * 获取商品类型标签
     */
    @Override
    public List<PmsProductTags> listAll(Integer categoryId) {
        return productTagsMapper.listAll(categoryId);
    }
    /**
     * 添加标签
     */
    @Override
    public void createTags(PmsProductTags productTags) {
         productTagsMapper.createTags(productTags);
    }
    /**
     * 删除标签
     */
    @Override
    public void delete(Integer id) {
        productTagsMapper.delete(id);
    }
    /**
     * 查看标签详细
     */
    @Override
    public PmsProductTags find(Integer id) {
        PmsProductTags productTags = productTagsMapper.find(id);
        return productTags;
    }
    /**
     * 修改标签内容
     */
    @Override
    public void upd(PmsProductTags productTags) {
        productTagsMapper.upd(productTags);
    }
}
